package com.aaa.mrcai.controller;

import com.aaa.mrcai.pojo.vo.ReceptionStateVO;
import com.aaa.mrcai.query.SendQuery;
import com.aaa.mrcai.result.AjaxResult;
import com.aaa.mrcai.service.ReceptionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author meowyf
 * @version 1.0
 * @Name Z_MJ
 * @date 2021/12/14 16:43:01
 */
@RestController
@RequestMapping("reception")
public class ReceptionController {
    @Autowired
    private ReceptionService receptionService;
    @RequestMapping("list")
    public AjaxResult list(SendQuery sendQuery){
        return receptionService.list(sendQuery);
    }

    @RequestMapping("/listScontend/{id}")
    public AjaxResult listScontend(@PathVariable int id){
        return receptionService.listScontend(id);
    }

    @RequestMapping("listRole")
    public AjaxResult listRole(){
        return receptionService.listRole();
    }

    @RequestMapping("/deleteReception/{id}")
    public AjaxResult deleteReception(@PathVariable int id){
        return receptionService.deleteReception(id);
    }

    @RequestMapping("updateState")
    public AjaxResult updateState(ReceptionStateVO receptionStateVO){
        return receptionService.updateState(receptionStateVO);
    }

    @RequestMapping("deleteAll")
    public AjaxResult deleteAll(){
        return receptionService.deleteAll();
    }
}
